#include "ogl/gut/RenderTargetDesc.h"
#include "ogl/gut/Dictionary.h"
#include "imgui/Editor.h"

using namespace Ogl::Gut;

template <>
bool ImGui::Editor::Edit(const std::string &label, Ogl::Gut::RenderTargetDesc &inst)
{
    int index = 0;

    if (TreeNode(label.c_str(), inst.m_BitFlag, index++))
    {
        ComboInst<Ogl::Gut::RenderTargetDescType, RenderTargetDescTypeDesc>("Type", Dictionary::m_RenderTargetDescTypeDescs, inst.m_Type);

        EditInst<Ogl::Gut::RenderTargetDesc1>("desc1", inst.m_Desc1);
        EditInst<Ogl::Gut::RenderTargetDesc2>("desc2", inst.m_Desc2);
        TreePop();
    }
    return false;
}